<template>
    <Modal v-model="modal.show" :title="modal.title" :width="modal.width" :ok-text="modal.okText" :cancel-text="modal.cancelText" @on-ok="onOk" @on-cancel="onCancel">
        <webComponent :modal="modal"></webComponent>
    </Modal>
</template>
<script>
import webComponent from '@/views/main-components/web.vue';
export default {
    props:["modal"],
    components: {
        webComponent
    },
    created() {},
    mounted() {

    },
    methods: {
        onOk(...args) {
            if (this.modal.onOk) {
                this.modal.onOk(...args);
                return;
            }
        },
        onCancel(...args) {
            if (this.modal.onCancel) {
                this.modal.onCancel(...args);
                return;
            }
        },
    },
    computed: {
    },
    watch:{
        "modal.show":function(value){
            // if(!value){
            //     this.modal.url = "about:blank";
            // }
        }
    }
};
</script>